CIM1000 Card Machine Communication Driver

 

CIM1000 Card Machine Communication Driver is the driver to communicate with card reader/writer controller CIM1000 of Kytronics Corp.,Ltd. in Korea.

 

1. Read settings

 

<Figure 1> is read setting example of CIM1000 Card Machine communication driver.

<Figure 1>  Read setting example of CIM1000 Card Machine communication driver

Device part of  <Figure 1> input Com Port(COM1), Baud Rate(38400), Parity Bit(0), Data Bit(8), Stop Bit(1) respectively.

CIM1000 Card Machine controller can set baud rate 9,600 ~ 57,600(default = 38,400), but parity bit, data bit, stop bit are fixed to 0, 8, 1.

 

CIM1000 Card Machine communication driver¡¯s read schedule 

Read schedule setting parameters are as follows:

1) STATION – Don't care.

2) Read command – Command = C11, C12, C13, C16, C21, C23, C24, C52, M31, M35, R31, R36, R61, U31, U41 ( Refer to <Table 1>).

3) Read Start Address Read start address according to command.

4) Save start address for Communication Server – Saving start address of Communication Server.

5) Read Size – Fixed to 1 (Refer to <Table 1> ).

 

Read schedule example) 

READ,     1,   M31,     2,    0,   1,

READ,     1,   C16,     0,    5,   1,

 

<Table 1> is read command and store values of CIM1000 Card Machine communication driver.

<Table 2> is error number and contents of CIM1000 Card Machine communication driver

Read Command
Contents

Store values

Read Start Address

Remarks
C11
Read of equipment model

Start Addr + 2 : model number, save only STRING memory

don't care

(Fixed to 0)

All Read/Write command

Start Addr + 0 : read status

Start Addr + 1 : error number

 

 

 

Read status : 0 = normal,

1 = read error,

2 = reading

Error number : 0 = normal,

etc = Refer to <Table 2>

C12
Read of equipment Firmware version

Start Addr + 2 : version number, save only STRING memory

C13
Read of Stacker status

Start Addr + 2 : Stacker status

0 = normal, 1 = warning, 2 = empty Stacker

C16
Read of Card position

Start Addr + 2 : Card position Sensor value

Bit 0 ~ bit 7 = Sensor 1 ~ Sensor 7

C21
Read of RTC IC

Start Addr + 2 ~ 4 : year, month, day

Start Addr + 5 ~ 7 : hour, minute, second

C23
Read of Capture Time

Start Addr + 2 : Capture Time

            0 = Non, 1 ~ 6 = 10 ~ 60 Sec

C24
Read of Retry Count

Start Addr + 2 : Retry Count

            0 = Non, 1 ~ 3 = 1 ~ 3 Retry

C52
Read of equipment module version

Start Addr + 2 : module version information,

     save only STRING memory

0 = Controller,

1 = MSRW, 2 = RFU

M31
Read of Magnetic Card

Start Addr + 2 : readed track data,

save WORD/DWORD/FLOAT/STRING memory

1 ~ 3 = 1 ~ 3 Track

M35
Read of Magnetic Card all Track

Start Addr + 2 : number 1 track data,

     save WORD/DWORD/FLOAT/STRING memory

Start Addr + 3 ~ 4 : number 2 ~ 3 Track data

don't care

(Fixed to 0)

I21
Read of IC Card

Start Addr + 2 : readed 1st byte data,

     save at STRING memory

Start Addr + 3 ~ : readed 2~ Byte data(ATR)

R31
Read of RF Card

Start Addr + 2 : readed 1st byte of Block,

     save STRING memory 16Byte data

Start Addr + 3 ~ 17 : readed 2 ~ 16 byte data of Block

0 ~ 63,

start address / 4 = sector,

start address % 4 = Block

R36
Read of RF each Card Sector

Start Addr + 2 : readed 1st byte data of Block 0,

      save STRING memory 16Byte string

Start Addr + 3 ~ 17 : readed 2~16 Byte data of Block 0

Start Addr + 18 : readed 1st byte data of Block 1

      save STRING memory 16Byte string

Start Addr + 19 ~ 33 : readed 2~16 Byte data of Block 1

Start Addr + 34 : readed 1st byte data of Block 2,

      save STRING memory 16Byte string

Start Addr + 35 ~ 49 : readed 2~16 Byte data of Block 2

0 ~ 15 = sector number

R61
Read of RF Card Detect value

Start Addr + 2 : RF Card Serial Number(DWORD ´ÜÀ§)

don't care 

U31
Read of Mifare Ultra Light Card

Start Addr + 2 : readed 1st byte data of Page,

      save STRING memory 16Byte string

Start Addr + 3 ~ 17 : readed 2~16 Byte data of Page

0 ~ 15 = Page number

U41
Read of Mifare Ultra Light Card
Serial Number

Start Addr + 2  ~ 8 : Serial Number data(each byte)

      save STRING memory 7Byte string

don't care

<Table 1> Read command and store values of CIM1000 Card Machine communication driver

Error number

Contents

2001h

Not Defined Command.

2002h

Unavailable Command.

2003h

Invalid Communication Frame.

2004h

Card is Jammed.

2005h

No Card.

2006h

Card Present. Please Eject Card.

2007h

Machine is Busy.

2008h

RTC Time Error.

2009h

Two or More Card Exist.

200Bh

Card Error(MSRW...).

2100h

Dispenser Error.

2101h

Dispenser Communication Error.

2104h

No Cards at Stacker.

2200h

The MS Reader/Writer That Cannot Use in This Model.

2201h

MSRW Communication Error.

2202h

MSRW Write Error.

2203h

MSRW Read Error.

2204h

IC Card Contact Error.

2209h

No Data on The Magnetic Card.

2300h

Unavailable RF Module.

2301h

RF Module Communication Error.

2302h

RF Module Authentication Error.

2303h

RF Card Write Error.

2304h

RF Card Read Error.

2305h

RF Card Detect Error.

2306h

RF Card Value Error.

2400h

Unavailable FLASH Memory.

<Table 2> Error number and contents of CIM1000 Card Machine communication driver

CIM1000 Card Machine communication driver store the same data in WORD, DWORD, FLOAT, STRING memory, but the data formats are different.

If you click the icon  in protocol option part, you can see the dialogue box such as <Figure 2>. you can also set read schedule by using this part. 

<Figure 2> Example of CIM1000 Card Machine communication driver¡¯s Option dialogue box

You can set read schedule by using , , button and listbox of <Figure 2>. 

<Figure 3> Example of CIM1000 Card Machine communication driver¡¯s read schedule Add/Edit dialogue box

When you click Add button or Edit button in dialogue box of <Figure 2>, dialogue box of <Figure 3> is shown.

 

2. Writing settings

You can set CIM1000 Card Machine by using write settings.

 

Bit Write

Bit write and word write have the same setting parameters except output value.

  

Word Write

Word write setting parameters are as follows:

1)  PORT                   Port no. (0 ~ 255)

2)  STATION             File number or don't care. ( Refer to <Table 3> )

3)  ADDRESS           Read or write address. ( Refer to <Table 3> )

4)  Extra1                   Read/Write command = C21, C23, C24, C40, C31, C32, C33, C34, C36, M33, M34, M51, I22, R32, R37, R41, R42, R51, R52, R53, R54, R55, R56, U32 . ( Refer to <Table 3> )

5)  Extra2                   Saving start address of Read/Write data.

 

<Table 3> is write command and range of write element of CIM1000 Card Machine communication driver.

<Table 4> is file path and data input method of imported from a file write command.

Command
Contents Range of STATION Range of Address Output value Remarks
C21
Read/Write of RTC IC Don't care 1 = Sync. to current computer time,
2 = Read of RTC( Refer to <Table 1>)
Don't care

All Read/Write command

Start Addr + 0 : read status

Start Addr + 1 : error number

 

 

 

Read status : 0 = normal,

1 = read error,

2 = reading

Error number : 0 = normal,

etc = Refer to <Table 2>

C23
Read/Write of Capture Time 1 = Write of Capture Time,
2 = Read of Capture Time( Refer to <Table 1>)
Address = 1,  0 = NON,
1 ~ 6 = 10 ~ 60 Sec
C24
Read/Write of Retry Count 1 = Write of Retry Count,
2 = Read of Retry Count( Refer to <Table 1>)
Address = 1, 0 = NON,
1 ~ 3 = 1 ~ 3
C40
BUZZ Setting 0 = Continue,
1 ~ 100 = 1 ~ 100
1 = ON,
2 = OFF
100 ~ 10000 = 100 ~ 10000 mSec
ON/OFF Time
C31
Instert card from Stacker Don't care Don't care 1 = MSRW, 2 = IC, 3 = RF
C32
Insert(move) Card
C33
Mode card to front Don't care
C34
Move the Card to Bin Box
C36
Move to front the Card and pull out
M33
Write of Magnetic Card M33.xxx : Don't care(xxx = writing string)
M33:File number( Refer to <Table 4>)
1 ~ 3 = 1 ~ 3 Track
M34
Write of Magnetic Card
after insert Card from Stacker
M34.xxx : Don't care(xxx = writing string)
M34:File number( Refer to <Table 4>)
M51
Magnetic Head Cleaning Don't care Don't care
I22
Write of IC Card data Fine number( Refer to <Table 4>)
R32
Write of RF Card for Block unit 0 ~ 47
Address / 3 = sector(0 ~ 15),
Address % 3 = Block(0 ~ 2)
R37
Write of RF Card for Sector unit 0 ~ 15 = Sector
R41
RF Card Increase Balance Don't care 0 ~ 47
Address / 3 = sector(0 ~ 15),
Address % 3 = Block(0 ~ 2)
DWORD unit's Index value
R42
RF Card Decrease Balance
R51
Change Secret Key Fine number( Refer to <Table 4>) 0 ~ 15 = Sector Don't care
R52
 Change Secret Key of all Sector Don't care
R53
Selection of Secret Key Index Don't care 1 = A Key, 2 = B Key
R54
Change Secret Key Fine number( Refer to <Table 4>) 0 ~ 15 = Sector Don't care
R55
Change Key Set number 0 ~ 15 = Sector 0 ~ 2 = Key Set 0 ~ 2
R56
Secret Key change inputed
 Key Set number for All Sector
Don't care 0 ~ 2 = Key Set 0 ~ 2
U32
Write of Mifare Ultra Light Card Don't care 0 ~  = Page No. DWORD(4 Byte) unit's output value
<Table 3> Write command and range of write element of CIM1000 Card Machine communication driver
Command File path

Input method

M33

Work folder\SCAN\MT_WRITE%03d.ini,

%03d = file number( Station )

 String data of 1 line,

Example) 12345ABCDE

M34
I22

Work folder\SCAN\IC_WRITE%03d.ini,

%03d = file number( Station )

1line 16 digit byte data(Max. 262) separated by comma( , )

Example) 2A, 3B, 55, 65, 5D, 4A,

R32

Work folder\SCAN\RF_WRITE%03d.ini,

%03d = file number( Station )

1 line 16 digit byte data separated by comma( , )

Example) 2A, 3B, 55, 65, 5D, 4A, 01, 14, 25, ¡¦.

R37

3 line 16 digit byte data separated by comma( , )

Example) 2A, 3B, 55, 65, 5D, 4A, 01, 14, 25, ¡¦,

3A, 4B, 55, 25, 1D, 4A, 01, 14, 25, ¡¦,

5A, 6B, 45, 35, 5D, 4A, 01, 14, 25, ¡¦,

R51

Work folder\SCAN\RF_KEY%03d.ini,

%03d = file number( Station )

1 line 16 digit 12 byte data separated by comma( , )

(Key A : 6 Byte, Key B : 6Byte)

Example) 21, 32, 5B, 6D, 52, 4A, 01, 14, 25, ¡¦,

R52
R54

1 line 16 digit 16 byte data separated by comma( , )

(Key A : 6 Byte, Access : 4 Byte, Key B : 6Byte)

Example) 21, 32, 5B, 6D, 52, 4A, 01, 14, 25, ¡¦,

R55

1 line 16 digit 12 byte data separated by comma( , )

(Key A : 6 Byte, Key B : 6Byte)

Example) 21, 32, 5B, 6D, 52, 4A, 01, 14, 25, ¡¦,

R56
<Table 4> File path and data input method of imported from a file write command

Write example 1)

PORT : 0   STATION : 0   ADDRESS : 0000  EXTRA1 : C31  EXTRA2 : 10

The setting parameter shown above is an example of write for insert card to 'Stacker'. ( write status data = read status : 10, errof status : 11 WORD/DWORD/FLOAT memory )

 

Write example 2)

PORT : 0   STATION : 0   ADDRESS : 0000  EXTRA1 : C36  EXTRA2 : 20

The setting parameter shown above is an example of write for move to front the Card and pull out. ( write status data = read status : 20, errof status : 21 WORD/DWORD/FLOAT memory )

 

Write example 3)

PORT : 0   STATION : 0   ADDRESS : 0002  EXTRA1 : M33.12345  EXTRA2 : 30

The setting parameter shown above is an example of data writing for Track 2 at inserted card, writing data = '12345'. ( write status data = read status : 30, errof status : 31 WORD/DWORD/FLOAT memory )

 

Write example 4)

PORT : 0   STATION : 3   ADDRESS : 0002  EXTRA1 : M33  EXTRA2 : 40

The setting parameter shown above is an example of data writing for Track 2 at inserted card, writing data = 'Work folder\SCAN\MT_WRITE03d.ini' of inputed 1st line data. ( write status data = read status : 40, errof status : 41 WORD/DWORD/FLOAT memory )

 

 

3. connection of communication cable and main power line

  Connection of communication cable and main power line are as follows.

 

Connection of communication cable

Please connect normal RS-232C communication cable to serial communication connector of CIM1000 Card Machine.

<Figure 4> is connection example of main power line and RS-232C communication cable to CIM1000 Card Machine.

 

1.png
<Figure 4> Connection example of main power line and RS-232C communication cable to CIM1000 Card Machine

Connection of main power line

Please connect main power line to power connector, 24V DC such as <Figure 4>. 

<Figure 5> shows the appearance of  CIM1000 Card Machine.  

2.png
<Figure 5> Appearance of  CIM1000 Card Machine